package com.mvc.security.model;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;

import com.mvc.framework.model.CompositeKeyAuditableEntity;

@Entity(name = "F_USER_DEPARTMENT")
@IdClass(UserDepartmentPK.class)
public class UserDepartment extends CompositeKeyAuditableEntity {
	@Id
	private Integer userId;
	@Id
	private Integer departmentId;
	public Integer getUserId() {
    	return userId;
    }
	public void setUserId(Integer userId) {
    	this.userId = userId;
    }
	public Integer getDepartmentId() {
    	return departmentId;
    }
	public void setDepartmentId(Integer departmentId) {
    	this.departmentId = departmentId;
    }
}

class UserDepartmentPK implements Serializable {
	private Integer userId;
	private Integer departmentId;
	public Integer getUserId() {
    	return userId;
    }
	public void setUserId(Integer userId) {
    	this.userId = userId;
    }
	public Integer getDepartmentId() {
    	return departmentId;
    }
	public void setDepartmentId(Integer departmentId) {
    	this.departmentId = departmentId;
    }
	
}
